import axios from "../utils/http"

export const getCoupon = (id)=> axios.get("/getcoupon?uid="+id)


export const dataFmt = (timeStamp)=>{
    const date = new Date(parseInt(timeStamp))
    const y = date.getFullYear()
    const m = date.getMonth()
    const d = date.getDate()
    const h = date.getHours()
    const mi = date.getMinutes()
    const s = date.getSeconds()
    return `${y}-${m}-${d} ${h}:${mi}:${s}`
}